package com.eastfair.auth.hystrix;

import com.eastfair.annotation.database.mybatis.auth.DataScopeOfUserId;
import com.eastfair.auth.api.AuthServiceFeign;
import com.eastfair.auth.dto.*;
import com.eastfair.auth.entity.Organization;
import com.eastfair.auth.entity.UserAccount;
import com.eastfair.auth.entity.UserOrganization;
import com.eastfair.auth.vo.OrganizationVo;
import com.eastfair.auth.vo.ResourceOrganizationVo;
import com.eastfair.auth.vo.UserAccountVo;
import com.eastfair.core.base.R;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 用户API熔断
 *
 * @author zuihou
 * @date 2019/07/23
 */
@Component
public class AuthApiFallback implements AuthServiceFeign {

    @Override
    public R<Organization> createProject(OrganizationDTO organizationDTO) {
        return R.timeout();
    }

    @Override
    public R<Organization> updProjectOrganization(OrganizationDTO organizationDTO) {
        return R.timeout();
    }

    @Override
    public R addOrgRole(OrganizationRoleDto orgRoleDto) {
        return R.timeout();
    }

    @Override
    public R updOrgRole(OrganizationRoleDto orgRoleDto) {
        return R.timeout();
    }

    @Override
    public R<List<Long>> queryRoleOfResourceId(Long resourceId) {
        return R.timeout();
    }

    @Override
    public R<List<Long>> queryOrgOfResourceId(Long resourceId, Long orgId) {
        return R.timeout();
    }

    @Override
    public R<UserOrganization> addUserOfOrg(UserOrganizationDTO userOrganizationDTO) {
        return R.timeout();
    }

    @Override
    public R<Organization> queryOrgOfType(OrganizationDTO organizationDTO) {
        return R.timeout();
    }

    @Override
    public R<List<ResourceOrganizationVo>> queryResource(List<Long> orgIds) {
        return R.timeout();
    }

    @Override
    public R<List<Long>> queryResourceId(List<Long> orgIds) {
        return R.timeout();
    }

    @Override
    public R<Map<Long, List<Organization>>> queryOrgOfResource(List<Long> resourceIds, List<Long> orgIds) {
        return R.timeout();
    }

    @Override
    public R<List<Map>> loadUserPermission(List<Long> userIds) {
        return R.timeout();
    }

    @Override
    public R<List<Map>> loadUserPermissionOfOrg(List<Long> orgIds) {
        return R.timeout();
    }

    @Override
    public R<List<Map>> loadUserPermissionOfRole(List<Long> roleIds) {
        return R.timeout();
    }

    @Override
    public R<List<Long>> queryMenuIdOfUser(Long userId) {
        return R.timeout();
    }

    @Override
    public DataScopeOfUserId queryDataScopeOfUserId(Long userId) {
        return null;
    }

    @Override
    public R<List<OrganizationVo>> queryList(List<Long> ids) {
        return R.timeout();
    }

    @Override
    public R addUserRole(UserRoleDto userRoleDto) {
        return R.timeout();
    }

    @Override
    public R updUserRole(UserRoleDto userRoleDto) {
        return R.timeout();
    }

    @Override
    public R removeOrgRole(UserRoleDto userRoleDto) {
        return R.timeout();
    }

    @Override
    public R queryUserRole(UserRoleDto userRoleDto) {
        return R.timeout();
    }

    @Override
    public R trasactionTest(OrganizationDTO organizationDTO) {
        return R.timeout();
    }

    @Override
    public R createOrgGroup(OrganizationDTO organizationDTO) {
        return R.timeout();
    }

    @Override
    public R<Map<Long, List<OrganizationVo>>> queryOrgOfUserId(OrganizationDTO organizationDTO) {
        return R.timeout();
    }

    @Override
    public R<List<Long>> queryChildOrgIdOfOrgId(OrganizationDTO organizationDTO) {
        return R.timeout();
    }

}
